<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<link rel="stylesheet" type="text/css"
	href="view/bootstrap-3.3.5/css/bootstrap.css" />
<link rel="stylesheet" type="text/css"
	href="view/bootstrapvalidator/css/bootstrapValidator.css" />
<script charset="utf-8" src="view/jquery/jquery-1.10.2.min.js"></script>
<script charset="utf-8" src="view/bootstrap-3.3.5/js/bootstrap.js"></script>
<script charset="utf-8"
	src="view/bootstrapvalidator/js/bootstrapValidator.js"></script>
<body>
	<div class="container">
		<form role="form" class="form-horizontal" action="duanXiaoXi/selectYiDu" method="post">
			标题：<input type="text" name="biaoti" size="7" value="${requestScope.biaoti}">
			内容：<input type="text" name="neirong" value="${requestScope.neirong}">
		         发件人：<input type="text" name="fajianren" value="${requestScope.fajianren}">
		     发布时间:<input type="date" name="start" value="${requestScope.start}">&nbsp;
		                 至:<input type="date" name="end" value="${requestScope.end}">&nbsp;&nbsp;
		       <input type="submit" value="查询">
		       <button><a href="duanXiaoXi/selectEmp">发送短消息</a></button>
	    </form>
		<table class="table table-bordered table-hover">
			<caption>已发短信</caption>
			<thead>
				<tr>
					<th>发件人</th>
					<th>信息标题</th>
					<th>信息内容</th>
					<th>收件人</th>
					<th>发布时间</th>
					<th>阅读时间</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${lists}" var="s">
					<tr class="active" onclick="xiangxi(${s.oid})">
						<td>
					       ${s.duanxiaoxi.employee.empName}
						</td>
						<td>${s.duanxiaoxi.biaoti}</td>
						<td>${s.duanxiaoxi.neirong}</td>
						<td>${s.employee.empName}</td>
						<td>${s.duanxiaoxi.createDate}</td>
						<td>${s.yuedushijian}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</body>
<script type="text/javascript">
	function xiangxi(oid){
		window.location.href="duanXiaoXi/detailsSee?oid="+oid;
	}
</script>
</html>